﻿namespace UnityEngine
{
    using System;
    using System.Runtime.CompilerServices;

    public sealed class TouchScreenKeyboard
    {
        private IntPtr keyboardWrapper;

        public TouchScreenKeyboard(string text, TouchScreenKeyboardType keyboardType, bool autocorrection, bool multiline, bool secure, bool alert, string textPlaceholder)
        {
            TouchScreenKeyboard_InternalConstructorHelperArguments arguments = new TouchScreenKeyboard_InternalConstructorHelperArguments {
                text = text,
                keyboardType = Convert.ToUInt32(keyboardType),
                autocorrection = Convert.ToUInt32(autocorrection),
                multiline = Convert.ToUInt32(multiline),
                secure = Convert.ToUInt32(secure),
                alert = Convert.ToUInt32(alert),
                textPlaceholder = textPlaceholder
            };
            this.TouchScreenKeyboard_InternalConstructorHelper(arguments);
        }

        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void Destroy();
        ~TouchScreenKeyboard()
        {
            this.Destroy();
        }

        public static TouchScreenKeyboard Open(string text)
        {
            string textPlaceholder = string.Empty;
            bool alert = false;
            bool secure = false;
            bool multiline = false;
            bool autocorrection = true;
            TouchScreenKeyboardType keyboardType = TouchScreenKeyboardType.Default;
            return Open(text, keyboardType, autocorrection, multiline, secure, alert, textPlaceholder);
        }

        public static TouchScreenKeyboard Open(string text, TouchScreenKeyboardType keyboardType)
        {
            string textPlaceholder = string.Empty;
            bool alert = false;
            bool secure = false;
            bool multiline = false;
            bool autocorrection = true;
            return Open(text, keyboardType, autocorrection, multiline, secure, alert, textPlaceholder);
        }

        public static TouchScreenKeyboard Open(string text, TouchScreenKeyboardType keyboardType, bool autocorrection)
        {
            string textPlaceholder = string.Empty;
            bool alert = false;
            bool secure = false;
            bool multiline = false;
            return Open(text, keyboardType, autocorrection, multiline, secure, alert, textPlaceholder);
        }

        public static TouchScreenKeyboard Open(string text, TouchScreenKeyboardType keyboardType, bool autocorrection, bool multiline)
        {
            string textPlaceholder = string.Empty;
            bool alert = false;
            bool secure = false;
            return Open(text, keyboardType, autocorrection, multiline, secure, alert, textPlaceholder);
        }

        public static TouchScreenKeyboard Open(string text, TouchScreenKeyboardType keyboardType, bool autocorrection, bool multiline, bool secure)
        {
            string textPlaceholder = string.Empty;
            bool alert = false;
            return Open(text, keyboardType, autocorrection, multiline, secure, alert, textPlaceholder);
        }

        public static TouchScreenKeyboard Open(string text, TouchScreenKeyboardType keyboardType, bool autocorrection, bool multiline, bool secure, bool alert)
        {
            string textPlaceholder = string.Empty;
            return Open(text, keyboardType, autocorrection, multiline, secure, alert, textPlaceholder);
        }

        public static TouchScreenKeyboard Open(string text, TouchScreenKeyboardType keyboardType, bool autocorrection, bool multiline, bool secure, bool alert, string textPlaceholder)
        {
            return new TouchScreenKeyboard(text, keyboardType, autocorrection, multiline, secure, alert, textPlaceholder);
        }

        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void TouchScreenKeyboard_InternalConstructorHelper(TouchScreenKeyboard_InternalConstructorHelperArguments arguments);

        public bool active { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        public static Rect area { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

        public static bool autorotateToLandscapeLeft { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        public static bool autorotateToLandscapeRight { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        public static bool autorotateToPortrait { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        public static bool autorotateToPortraitUpsideDown { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        public bool done { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

        public static bool hideInput { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        public string text { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        public static bool visible { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

        public bool wasCanceled { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }
    }
}

